home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / MacApp / MacApp 3.0a2 / CPlusIncludes / OSEvents.h < prev    next >
Text File  |  1991-05-01  |  2KB  |  73 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:34 PM
  4.     OSEvents.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __OSEVENTS__
  15. #define __OSEVENTS__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __GEOMETRY__
  22. #include <Geometry.h>
  23. #endif
  24.  
  25. #ifndef __EVENTS__
  26. #include <Events.h>
  27. #endif
  28.  
  29. #ifndef __OSUTILS__
  30. #include <OSUtils.h>
  31. #endif
  32.  
  33.  
  34. struct EvQEl {
  35.     QElemPtr qLink;
  36.     short qType;
  37.     short evtQWhat;     /*this part is identical to the EventRecord as...*/
  38.     long evtQMessage;   /*defined in ToolIntf*/
  39.     long evtQWhen;
  40.     Point evtQWhere;
  41.     short evtQModifiers;
  42. };
  43.  
  44. typedef EvQEl *EvQElPtr;
  45.  
  46.  
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. #pragma parameter __D0 PostEvent(__A0,__D0)
  51. pascal OSErr PostEvent(short eventNum,long eventMsg)
  52.     = 0xA02F; 
  53. #pragma parameter __D0 PPostEvent(__A0,__D0,__A1)
  54. pascal OSErr PPostEvent(short eventCode,long eventMsg,EvQElPtr& qEl)
  55.     = {0xA12F,0x2288}; 
  56. #pragma parameter __D0 OSEventAvail(__D0,__A0)
  57. pascal Boolean OSEventAvail(short mask,EventRecord& theEvent)
  58.     = {0xA030,0x5240}; 
  59. #pragma parameter __D0 GetOSEvent(__D0,__A0)
  60. pascal Boolean GetOSEvent(short mask,EventRecord& theEvent)
  61.     = {0xA031,0x5240}; 
  62. pascal void FlushEvents(short whichMask,short stopMask)
  63.     = {0x201F,0xA032}; 
  64. #pragma parameter SetEventMask(__D0)
  65. pascal void SetEventMask(short theMask)
  66.     = {0x31C0,0x0144}; 
  67. #define GetEvQHdr() ((QHdrPtr) 0x014A)
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #endif
  73.